package cn.swust.HuXinMeng.tilegame.sprites;

import java.lang.reflect.Constructor;

import cn.swust.HuXinMeng.graphics.Animation;
import cn.swust.HuXinMeng.graphics.Sprite;

public class PowerUp extends Sprite {

	private PowerUp(Animation anim) {
		super(anim);
	}

	@SuppressWarnings("unchecked")
	@Override
	public PowerUp clone() {
		Constructor<PowerUp> constructor = (Constructor<PowerUp>) (getClass().getConstructors()[0]);
		try {
			return constructor.newInstance(new Object[] { (Animation) anim.clone() });
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}

	public static class Star extends PowerUp {
		public Star(Animation anim) {
			super(anim);
		}
	}

	public static class Music extends PowerUp {
		public Music(Animation anim) {
			super(anim);
		}
	}

	public static class Goal extends PowerUp {
		public Goal(Animation anim) {
			super(anim);
		}
	}

}
